package com.dao;

import com.entity.Subject;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface SubjectDao {

    List<Subject> getAll();

    List<Subject> getByQuery(@Param("subjectName") String subjectName,
                             @Param("gradeID") Integer gradeID);

    List<Subject> getByObject(Subject subject);

    List<Subject> getByMap(Map<String,Object> queryMap);

    //不定条件查询
    List<Subject> getList(Subject subject);

    //不定条件查询分页
    List<Subject> getListByPage(@Param("subject") Subject subject,
                                @Param("pageIndex") Integer pageIndex,
                                @Param("pageSize") Integer pageSize);

    List<Subject> getListOrderBy(@Param("orderByName") String orderByName,
                                 @Param("orderByType") String orderByType);

    //单一条件查询
    List<Subject> getListChoose(Subject subject);

    //根据年级编号列表查询
    List<Subject> getListByGradeIDs(List<Integer> gids);

    Subject getOne(Integer subjectNo);

    int add(Subject subject);

    int update(Subject subject);

    int update2(Subject subject);

    int delete(Integer subjectNo);
}
